Skip to content

Launch Desk Debugging Lab - By Sanjoon Charles#12

Open
Sanjoon01 wants to merge 12 commits into
codezelaca:mainfrom
Sanjoon01:main
Open

Launch Desk Debugging Lab - By Sanjoon Charles#12
Sanjoon01 wants to merge 12 commits into
codezelaca:mainfrom
Sanjoon01:main

Conversation

@Sanjoon01

@Sanjoon01 Sanjoon01 commented Jun 25, 2026

Copy link
Copy Markdown

🐞 Bug Fix Summary – All 12 Issues Resolved

This PR fixes all reported bugs in the project and improves overall functionality, consistency, and data handling across the application.

✅ Fixes Included
Fixed typo in add button function name (addChek → addCheck)
Corrected form validation logic so both title and category are required
Aligned local storage keys for consistent save/load behavior
Improved search functionality to support filtering by title, category, priority, status, and owner
Fixed status filter to correctly compare against status instead of priority
Fixed CSS handling for “In Progress” status to ensure proper styling
Updated score calculation logic by correcting status handling
Fixed due-soon counter to accurately count items due within 7 days
Fixed delete button attribute mismatch issue
Corrected demo data reset file path to launch-checks.json
Fixed CSV export mapping from name field to title
Ensured status updates properly trigger saveChecks() and applyFilters() for correct UI refresh

🔧 Improvements
Better consistency in data handling across modules
More accurate filtering and reporting logic
Improved UI reliability for status-based rendering

📌 Notes

All fixes are committed individually as required (1 bug per commit).

Summary by CodeRabbit

  • Bug Fixes
    • Launch checklist items now save and load consistently, so persisted data is more reliable.
    • Adding items works correctly again, and required field validation now catches missing title or category values.
    • Search and filters now match more fields, improving results across owner, title, category, priority, and status.
    • Status updates, delete actions, metrics, and CSV export now behave correctly.
    • Demo reset now pulls the correct sample data.

Sanjoon01 added 12 commits June 25, 2026 22:19
Fix bug 1 (AddCheck)
Fix bug 2 (Title and Category)
Fix bug 3 (Search)
Fix bug 4 (Status Filter)
Fix bug 5 (in-progress)
Bug fix 6 (Readiness Score)
Bug fix 7 (Due Date)
Bug fix 8 (Remove btn)
Bug fix 9 (Reset btn)
Bug fix 10 (Export csv)
Bug fix 11 (Save Check)
Bug fix 12 (STORAGE KEY)
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR corrects launch checklist persistence, validation, filtering, metrics, delete/status interactions, demo reset, and CSV export in js/app.js.

Changes

Launch checklist fixes

Layer / File(s) Summary
Storage and add flow
js/app.js
Local storage uses one key, the add form submits through the correct handler, saved checks load and save through the same entry, and add validation rejects missing title or category.
Filtering and status badges
js/app.js
Search matching spans owner, title, category, priority, and status, and status badge classes slugify spaced status values.
Metrics and table actions
js/app.js
Metrics count fixed and due-soon checks with corrected status and date rules, delete clicks read the remove-id dataset, and status changes persist before refreshing the filtered view.
Demo reset and CSV export
js/app.js
Demo reset loads the launch-checks JSON file, and CSV export writes each row from the check title field.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through checks both old and new,
Fixed badges, filters, metrics too.
One key to store, one CSV bite,
Now launch bunnies run just right.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title names the lab and author but does not describe the actual bug fixes or functional changes in the PR. Rename it to a concise summary of the main change, such as fixing checklist persistence, filtering, and status handling in js/app.js.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
js/app.js (1)

93-93: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Stale scaffolding comment.

The handler now correctly calls handleAddCheck, but the trailing // Intentional bug: misspelled function name. comment is now misleading. Consider stripping the Intentional bug: comments left on fixed lines (here and lines 135, 171, 175, 197, 237, 241, 253, 285, 292, 319) to avoid confusing future readers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@js/app.js` at line 93, The submit handler in the form setup is already
correct, but the trailing “Intentional bug” scaffold comment is now misleading.
Remove the stale comment from the `form.addEventListener` line and clean up the
other fixed `Intentional bug` comments in this file near the corresponding
handlers and listeners (`handleAddCheck` and the related event bindings) so the
code reflects the actual behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@js/app.js`:
- Around line 237-241: The `dueSoon` metric in `app.js` is counting overdue
items because `daysUntil(check.dueDate) <= 7` has no lower bound. Update the
`dueSoon` filter in the checks aggregation to use a 0–7 day window so it only
counts upcoming work, keeping the existing `daysUntil` helper and surrounding
`checks.filter(...)` logic intact.

---

Nitpick comments:
In `@js/app.js`:
- Line 93: The submit handler in the form setup is already correct, but the
trailing “Intentional bug” scaffold comment is now misleading. Remove the stale
comment from the `form.addEventListener` line and clean up the other fixed
`Intentional bug` comments in this file near the corresponding handlers and
listeners (`handleAddCheck` and the related event bindings) so the code reflects
the actual behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2adad443-d814-478c-ba48-22865dbd58be

📥 Commits

Reviewing files that changed from the base of the PR and between ccb0d19 and 353ae27.

📒 Files selected for processing (1)
  • js/app.js

Comment thread js/app.js
Comment on lines +237 to +241
const fixed = checks.filter((check) => check.status === "Fixed").length; // Intentional bug: valid fixed status is "Fixed".
const criticalOpen = checks.filter(
(check) => check.priority === "Critical" && check.status !== "Fixed",
).length;
const dueSoon = checks.filter((check) => daysUntil(check.dueDate) > 7).length; // Intentional bug: this should count items due within 7 days.
const dueSoon = checks.filter((check) => daysUntil(check.dueDate) <= 7).length; // Intentional bug: this should count items due within 7 days.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -nC3 -i 'due.?soon|within 7|days' docs/

Repository: codezelaca/fs-se-debugging-bugs

Length of output: 2810


🏁 Script executed:

#!/bin/bash
sed -n '168,185p' docs/instructor-solution-guide.md
printf '\n---\n'
sed -n '230,245p' js/app.js

Repository: codezelaca/fs-se-debugging-bugs

Length of output: 1219


🏁 Script executed:

#!/bin/bash
python3 - <<'PY'
from pathlib import Path
text = Path('js/app.js').read_text()
for i, line in enumerate(text.splitlines(), 1):
    if 230 <= i <= 245:
        print(f"{i}:{line}")
PY

Repository: codezelaca/fs-se-debugging-bugs

Length of output: 873


dueSoon should use a 0–7 day window.
daysUntil(check.dueDate) <= 7 also includes overdue items; bound it to non-negative days so the metric only counts upcoming work.

Proposed adjustment
-  const dueSoon = checks.filter((check) => daysUntil(check.dueDate) <= 7).length;
+  const dueSoon = checks.filter((check) => {
+    const days = daysUntil(check.dueDate);
+    return days >= 0 && days <= 7;
+  }).length;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const fixed = checks.filter((check) => check.status === "Fixed").length; // Intentional bug: valid fixed status is "Fixed".
const criticalOpen = checks.filter(
(check) => check.priority === "Critical" && check.status !== "Fixed",
).length;
const dueSoon = checks.filter((check) => daysUntil(check.dueDate) > 7).length; // Intentional bug: this should count items due within 7 days.
const dueSoon = checks.filter((check) => daysUntil(check.dueDate) <= 7).length; // Intentional bug: this should count items due within 7 days.
const fixed = checks.filter((check) => check.status === "Fixed").length; // Intentional bug: valid fixed status is "Fixed".
const criticalOpen = checks.filter(
(check) => check.priority === "Critical" && check.status !== "Fixed",
).length;
const dueSoon = checks.filter((check) => {
const days = daysUntil(check.dueDate);
return days >= 0 && days <= 7;
}).length; // Intentional bug: this should count items due within 7 days.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@js/app.js` around lines 237 - 241, The `dueSoon` metric in `app.js` is
counting overdue items because `daysUntil(check.dueDate) <= 7` has no lower
bound. Update the `dueSoon` filter in the checks aggregation to use a 0–7 day
window so it only counts upcoming work, keeping the existing `daysUntil` helper
and surrounding `checks.filter(...)` logic intact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant